Skip to content

Fix npm publish including root-level source files - #292

Open
Swimburger wants to merge 1 commit into
cohere-ai:mainfrom
Swimburger:patch-1
Open

Fix npm publish including root-level source files#292
Swimburger wants to merge 1 commit into
cohere-ai:mainfrom
Swimburger:patch-1

Conversation

@Swimburger

@Swimburger Swimburger commented Apr 7, 2026

Copy link
Copy Markdown

The published cohere-ai package currently includes both the root-level output files and the compiled dist/ output, bloating the install size and exposing unintended files to consumers.

This PR updates .npmignore to exclude source files from the published package, so only dist/ is included.

Also added the other entries Fern would normally manage, for completeness. Since .npmignore is in .fernignore, this file will need to be maintained manually going forward.


Note

Low Risk
Low risk: this only changes npm packaging contents, though it could break consumers if they relied on previously (incorrectly) published files.

Overview
Tightens npm publish behavior by expanding .npmignore to exclude additional root-level project files (e.g., tests, .fern, biome.json, pnpm-lock.yaml, scripts, and test configs) and ensure only intended artifacts like dist/ are included in the published package.

Reviewed by Cursor Bugbot for commit 6e2f18b. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant